var BaseView = Backbone.View.extend({
  render: function (obj) {
    if (typeof this.model != 'undefined') {
      obj = obj || this.model.toJSON();
    } else {
      obj = obj || {};
    }
    
    this.$el.html(this.template(obj));

    return this;
  },
  clearValidationCode: function() {
    return $.ajax({
      method: "GET",
      url: 'smsCodeValidateClear',
      headers: {
          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
      }
    });
  }
});